class H_SET{E} < $SET{E}
****
Implementation of sets using dynamic hash tables. This implementation is also available of dealing with equal but not same objects.


Flattened version is here

Ancestors
$SET{_} $RO_SET{_} $STR $CONTAINER{_}
$ELT{_} $ELT DYNAMIC_BUCKET_TABLE{_,_} COMPARE{_}
SET_INCL{_} RO_SET_INCL{_}

Descendants
SET{_}



Public


Features
clear
**** Extremely inefficient. Must be rewritten by someone who has looked at the implementation (delete(elt!) may have problems) Creates a separate list of elements to delete to separte out iteration from modification
create(e: $ELT{E}): SAME
create_from(a: ARRAY{E}): SAME
delete(e: E)
delete(e:E): E
**** Removes an element from the set. Returns the deleted element. Returns void (or E::nil if E inherits $NIL{E}) if there is no element to delete.
diff(s: $RO_SET{E}): SAME
get(e:E): E
**** Returns the element equal to 'e' from the set. Returns void or E::nil if there is no such element. Self may not be void.
has(e:E): BOOL
insert(e:E)
insert_replace(e:E)
**** Inserts e into the set. If there is already an element equal to e in the set, the old element will be replaced.
insert_replace(e:E): E
**** Does the same like insert_replace but returns the old element which is being replaced or the same object if there was no old one.
intersection(s:$RO_SET{E}): SAME
size: INT
sym_diff(s: $RO_SET{E}): SAME
union(s: $RO_SET{E}): SAME

Iters
elt!: E


Private


The Sather Home Page